<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>AppletInteractionDemo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{
	width:1024px;
	height:768px;
	margin: 0px auto;
}

table{
	border: 1px solid black;
	border-collapse: collapse;
}

td{
	border: 1px solid black;
}

td.alternative{
	background-color: #eee;
}
</style>
<script src="jquery-1.3.2.js"></script>
<script type="text/javascript">
function doAlert(msg) {
	alert(msg);
}
function setTableClass(className){
	alert(className);
	$('table tr:odd').addClass(className);
	return 'table class has been set to: (' + className + ')';
}
</script>
</head>
<body>
<table>
	<tr>
		<td>
			InvokingJsByProtocal
		</td>
		<td>
			<applet code="ui.swing.applet.javascript.InvokingJsByProtocal"
				codebase="../../../../">
			</applet>
		</td>
		<td>
			<p>
			getAppletContext().showDocument(new URL("javascript:doAlert(\"" + msg + "\")"));
			</p>
		</td>
	</tr>
	<tr>
		<td>
			InvokeByJSObject
		</td>
		<td>
			<applet code="ui.swing.applet.javascript.InvokeByJSObject"
				codebase="../../../../">
			</applet>
		</td>
		<td>
			<p>
			JSObject win = JSObject.getWindow(InvokeByJSObject.this);
			Object result = win.call("setTableClass", new Object[]{"alternative"});
			JOptionPane.showMessageDialog(InvokeByJSObject.this, result);
			</p>
		</td>
	</tr>
	
</table>


</body>
</html>